$(document).ready(function(){
	$('.jeton').draggable({
		snap : "td",
		cursor :"move",
		containment: '#plateau' });

	$('.ui-droppable').droppable({
		drop: function( event, ui ) {
			var p = document.getElementById(this.id);
			var c = p.getElementsByTagName('img')[0].id;
			var d = p.getElementsByTagName('img')[0];
			p.removeChild(d);
			ui.draggable.appendTo(this.id);
			var id = ui.draggable.attr("id");
			document.getElementById("caseChoisie").value = c ;
			document.getElementById("jetonPlace").value = id;
			document.getElementById("tourSuivant").removeAttribute("disabled");
		}
	});
});